/*
	Travis Tarr
	CS362-400
	
	Assignment #3
	
	Testing the great_hall cardEffect
	+1 card, +1 action
	
*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

void testGreatHall() {
    int i;
    int seed = 1000;
    int numPlayer = 2;
    int maxBonus = 10;
    int p, r, handCount;
    int bonus;
    int k[10] = {adventurer, council_room, feast, gardens, mine
               , remodel, smithy, village, baron, great_hall};
    struct gameState G;
    int maxHandCount = 5;
	int actions;


    printf ("TESTING great_hall cardEffect():\n");
	
	for(p = 0; p < numPlayer; p++) {
		memset(&G, 23, sizeof(struct gameState));   // clear the game state
		r = initializeGame(numPlayer, k, seed, &G); // initialize a new game
		
		handCount = G.handCount[p];
		actions = G.numActions;
		if(cardEffect(great_hall, -1, -1, -1, &G, 0 ,0) == 0) {
			if((G.handCount[p] == handCount + 1) && (G.numActions == actions + 1)) {
				printf("testGreatHall(): PASSED when testing great_hall cardEffect.\n");
			} else {
				printf("testGreatHall(): FAILED when testing great_hall cardEffect.\n");
			}
		} 
	
	}	
}

int main() {
	testGreatHall();
	return 0;
}